package com.nuanqian.springbootdubboserver.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.nuanqian.springbootcommon.utils.ResponseBean;
import com.nuanqian.springbootdubboapi.service.MybatisTest;
import com.nuanqian.springbootdubbodao.mapper.DevicePolicyMapper;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author 李蒙
 * @date 2020/6/18 18:21
 */
@Service(version = "1.0.0",timeout = 10000,group = "1")
public class MybatisTestImpl implements MybatisTest {

    @Autowired
    private DevicePolicyMapper devicePolicyMapper;

    @Override
    public ResponseBean selectById(String id) {
        return new ResponseBean(200,devicePolicyMapper.selectByPrimaryKey(Long.parseLong(id)));
//        return new ResponseBean(200,id);
    }
}
